home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf;
-
- import com.sun.java.swing.JComponent;
- import java.awt.Component;
- import java.awt.Dimension;
- import java.awt.Graphics;
-
- public abstract class ComponentUI {
- public boolean contains(JComponent c, int x, int y) {
- return ((Component)c).inside(x, y);
- }
-
- public static ComponentUI createUI(JComponent c) {
- throw new Error("ComponentUI.createUI not implemented.");
- }
-
- public Dimension getMaximumSize(JComponent c) {
- return this.getPreferredSize(c);
- }
-
- public Dimension getMinimumSize(JComponent c) {
- return this.getPreferredSize(c);
- }
-
- public Dimension getPreferredSize(JComponent c) {
- return null;
- }
-
- public void installUI(JComponent c) {
- }
-
- public void paint(Graphics g, JComponent c) {
- }
-
- public void uninstallUI(JComponent c) {
- }
-
- public void update(Graphics g, JComponent c) {
- if (c.isOpaque()) {
- g.setColor(((Component)c).getBackground());
- g.fillRect(0, 0, c.getWidth(), c.getHeight());
- }
-
- this.paint(g, c);
- }
- }
-